package com.meiyou.service.impl;

import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.meiyou.mapper.AdminMapper;
import com.meiyou.service.AdminService;

@Service
public class AdminServiceImpl implements AdminService{
    
	@Autowired
	AdminMapper admin;
	
	/**
	 * 管理员登录
	 */
	public boolean seltryLogin(String uname, String pwd,HttpServletRequest req) {
		// TODO Auto-generated method stub
		if(admin.selLogin(uname, pwd)==1) {
			req.getSession().setAttribute("manager", uname);
			return true;
		}
		return false;
	}

}
